:root {
    --primary: #6c5ce7;
    --secondary: #a29bfe;
    --accent: #fd79a8;
    --dark: #2d3436;
    --light: #dfe6e9;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #d63031;
    --card-bg: rgba(255, 255, 255, 0.95);
    --sidebar-width: 280px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--dark);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(45, 52, 54, 0.95);
    color: white;
    padding: 20px 0;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
    z-index: 100;
    overflow-y: auto;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
}

.logo {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(to right, #fd79a8, #a29bfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo p {
    font-size: 0.9rem;
    color: var(--light);
    margin-top: 5px;
}

.menu {
    list-style: none;
    padding: 0 15px;
}

.menu-item {
    margin-bottom: 10px;
    border-radius: 10px;
    overflow: hidden;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--light);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 10px;
}

.menu-link:hover, .menu-link.active {
    background: linear-gradient(to right, #6c5ce7, #fd79a8);
    color: white;
    transform: translateX(5px);
}

.menu-link i {
    margin-right: 15px;
    font-size: 1.2rem;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
}

.header {
    display: flex;
    justify-content: right;
    align-items: center;
    margin-bottom: 30px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    padding: 5px 20px;
    width: 400px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.search-box input {
    border: none;
    outline: none;
    padding: 10px;
    font-size: 1rem;
    width: 100%;
    background: transparent;
}

.knowlige {
    display: block;
    cursor: pointer;
    min-width: min-content;
    /*width: 150px;*/
    text-align: center;
    margin: 235px auto;
    padding: 15px 30px;
    border-radius: 12px;
    color: black !important;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    position: relative;
    transition: all 0.3s ease;
    transform: translateY(-4px);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
    background: linear-gradient(45deg, #667eea, #764ba2);
    overflow: hidden;
    /*border-radius: 50px;*/
    /*color: white !important;*/
    /*font-weight: 600;*/
    /*text-transform: uppercase;*/
    /*letter-spacing: 1px;*/
    /*border: none;*/
    /*background: linear-gradient(45deg, #ff6b6b, #ee5a24);*/
    /*box-shadow: 0 8px 25px rgba(238, 90, 36, 0.3);*/
    /*transform: translateY(0);*/
}
.knowlige:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(107, 36, 238, 0.4);
}

.search-box button {
    background: var(--primary);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background: var(--accent);
    transform: rotate(15deg);
}

.user-info {
    display: flex;
    align-items: center;

}

.user-info img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid var(--primary);
}

/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}

/* 输入区域样式 */
.input-area {
    margin-bottom: 20px;
}

.input-area textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    resize: vertical;
    min-height: 120px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-area textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.btn {
    background: linear-gradient(to right, var(--primary), var(--accent));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
}

/* 结果展示样式 */
.result-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.entity-tag {
    display: inline-block;
    background: linear-gradient(to right, var(--secondary), var(--primary));
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    margin: 5px;
    font-size: 0.9rem;
}

.relation-item {
    padding: 15px;
    margin: 10px 0;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
}

/* 知识图谱可视化区域 */
.graph-container {
    width: 100%;
    height: 500px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

#knowledge-graph {
    width: 100%;
    height: 100%;
}

.graph-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.graph-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.graph-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .sidebar {
        width: 80px;
        padding: 20px 0;
    }

    .sidebar .logo h1, .sidebar .logo p, .menu-link span {
        display: none;
    }

    .menu-link {
        justify-content: center;
        padding: 20px;
    }

    .menu-link i {
        margin-right: 0;
        font-size: 1.5rem;
    }

    .main-content {
        margin-left: 80px;
    }
}

@media (max-width: 768px) {
    .search-box {
        width: 200px;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }
}
/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}

.visualization-panel {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.network-container {
    height: 500px;
    border: 2px solid #ddd;
    border-radius: 8px;
}